﻿$(document).ready(function () {

    setInterval(function () {
        $.ajax({
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            url: "/UserTextNotification/GetMessages",
            success: function (data) {
                for (msg in data) {
                    $.gritter.add({
                        title: data[msg].title,
                        text: data[msg].text,
                        sticky: false
                    });
                }
            }
        })
    }, 15000)
});
